package io.github.xbeeant.eoffice.onlyoffice;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;

import java.io.File;

/**
 * @author xiaobiao
 * @version 2021/7/1
 */
@Configuration
@EnableAutoConfiguration
public class OnlyOfficeConfiguration {

    @Value("${onlyoffice.download}")
    private String server;

    @Value("${onlyoffice.storage-folder}")
    private String storageFolder;

    public String getStorageFolder() {
        return storageFolder;
    }

    public String getChangesFolder() {
        return storageFolder + File.separator + "changes" + File.separator;
    }

    public String getServer() {
        return server;
    }

    public void setServer(String server) {
        this.server = server;
    }

    public void setStorageFolder(String storageFolder) {
        this.storageFolder = storageFolder;
    }
}
